1. Technical Field
The present invention relates generally to an improved data processing system and in particular to a method and apparatus for processing a data stream. Still more particularly, the present invention provides a method and apparatus for reducing the size of a data stream.
2. Description of Related Art
Currently, metadata streams are a stream of application generated graphical function calls that may be printed by printer or display on a display device. Metadata is data about data. For example, the title, subject, author, and size of a file constitute metadata about a file. With respect to graphics, the current position, color, and size of a primitive, such as a box, constitute the metadata for the box.
Within a metadata stream, new frame calls are embedded to switch from one page to the next page. Currently, in order to print a specific page other than starting at the first page, the module or application performing the printing of the metadata stream has to start at page one and start recording all the attributes, also referred to as state information, up to the page that the user wants to be printed. This process becomes increasingly difficult in the case in which a user wants to print a document in reversal order or print every other page.
Therefore, it would be advantageous to have an improved method and apparatus for managing printing of a graphics data stream.
The present invention provides a method and apparatus in a data processing system for generating a metadata stream. Calls are received calls from an application, wherein the calls are received calls. The current application attributes in the received calls are tracked. The received calls are monitored for a new page call. When a new page call is identified in the received calls, the new page call is placed within the metadata stream to identify a new page in the metadata stream. Current application attributes are placed in the metadata st m within the new page identified by the new page call, wherein the new page within the metadata stream may be outputted/printed or reprocessed using the current application attributes located within new page.